<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>React</title>
    <script src="../build/react.js"></script>
    <script src="../build/react-dom.js"></script>
    <script src="../build/browser.min.js"></script>
  </head>
  <body>
    <div id="example"></div>
    <script type="text/babel">
      let Input=React.createClass({
        getInitialState: function(){
          return {value: 'Hello!'};
        },
        handleChange: function(event){
          this.setState({value: event.target.value});
        },
        render:function(){
          let value=this.state.value;
          return(
            <div>
              <input type="text" value={value} onChange={this.handleChange} />
              <p>{value}</p>
            </div>
          );
        }
      });

      ReactDOM.render(
        <Input></Input>,
        document.getElementById('example')
      )
    </script>
  </body>
</html>
